#pragma once
#include "../vfs/FileDescriptor.h"

namespace ja2{ namespace vfs
{
	//! Library file representation.
	class FileDescriptorLibrary : public FileDescriptor
	{
		// Attributes
	private:
		//! Begin position.
		long long const m_Begin;
		//! End position.
		long long const m_End;
		//! Shared stream used.
		std::ifstream *m_pStream;

		// Operations
	private:
		//! See base.
		virtual FileDeviceHandlePtr_t do_get_file_handle(std::ios_base::openmode Mode) const;

		// Construction/Destruction
	public:
		FileDescriptorLibrary(long long Begin, long long End, boost::filesystem::path const &Name, std::ifstream *pStream);
	};
} /*vfs*/} /*ja2*/
